@import '../../colors.scss';

.checkbox {
	position: relative;

	&>label {
		position: relative;

		&:hover {
			cursor: pointer;
		}

		&>span {
			position: relative;
			padding-left: 57px;
			user-select: none;
		}
		&>span::before {
			content: '';
			position: absolute;
			top: -2px;
			left: 0px;
			width: 45px;
			height: 20px;
			background-color: $llgray_1;
			border: 1px solid $black_2;
			border-radius: 20px;
			transition: all .1s ease;
		}
		&>span:hover::before {
			box-shadow: 0 0 2px 0px $black_2;
		}
		&>span::after {
			content: '';
			position: absolute;
			top: 0px;
			left: 3px;
			width: 16px;
			height: 16px;
			background-color: $llgray_1;
			border: 1px solid $black_2;
			border-radius: 20px;
			transition: all .2s ease;
		}
		&>input[type="checkbox"]:checked ~ span::before {
			content: '';
			position: absolute;
			top: -2px;
			left: 0px;
			width: 45px;
			height: 20px;
			background-color: $black_2;
			border: 1px solid $black_2;
			border-radius: 20px;
			transition: all .1s ease;
		}
		&>input[type="checkbox"]:checked ~ span::after {
			content: '';
			position: absolute;
			top: 0px;
			left: 27px;
			width: 16px;
			height: 16px;
			background-color: $llgray_1;
			border: 1px solid $black_2;
			border-radius: 20px;
			transition: all .2s ease;
		}

		&>input[type="checkbox"] {
			display: none;
		}
	}
}

.checkbox.disabled {
	position: relative;

	&>label {
		position: relative;

		&:hover {
			cursor: default;
		}

		&>span:hover::before {
			box-shadow: 0 0 0px 0px transparent;
		}

		&>span::before {
			content: '';
			position: absolute;
			top: -2px;
			left: 0px;
			width: 45px;
			height: 20px;
			background-color: $llgray_1;
			border: 1px solid $gray_2;
			border-radius: 20px;
			transition: all .1s ease;
		}
		&>span::after {
			content: '';
			position: absolute;
			top: 0px;
			left: 3px;
			width: 16px;
			height: 16px;
			background-color: $llgray_1;
			border: 1px solid $gray_2;
			border-radius: 20px;
			transition: all .2s ease;
		}

		&>input[type="checkbox"] {
			display: none;
		}
	}
}
